<template>
	<view class="login-container">
		<!-- 主要内容区域 -->
		<view class="main-content">
			<!-- 欢迎标题 -->
			<view class="header-section">
				<text class="welcome-title">欢迎使用"晨夕相伴"小程序</text>
			</view>
			
			<!-- 选择入口 -->
			<view class="entry-section">
				<text class="section-title">请选择您的身份</text>
				
				<view class="entry-cards">
					<!-- 老年用户端 -->
					<view class="entry-card" @click="goToElderlyLogin">
						<image class="entry-image" src="/static/Index_Imtheold.png"></image>
						<text class="entry-title">老年用户端</text>
					</view>
					
					<!-- 志愿者端 -->
					<view class="entry-card" @click="goToVolunteerLogin">
						<image class="entry-image" src="/static/index_Imthevolenteer.png"></image>
						<text class="entry-title">志愿者端</text>
					</view>
				</view>
				
				<!-- 帮助说明 -->
				<view class="help-section">
					<image class="help-icon" src="/static/help.png"></image>
					<view class="help-content">
						<text class="help-text">不知如何选择？可实名验证时按年龄分配</text>
						<text class="help-detail" @click="showHelpDetail">详情</text>
					</view>
				</view>
			</view>
			
			<!-- 底部图片 -->
			<view class="bottom-section">
				<image class="bottom-image" src="/static/Index_next.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {

		},
		methods: {
			// 跳转到老年用户端登录
			goToElderlyLogin() {
				// 直接跳转到老年用户端页面
				uni.navigateTo({
					url: '/pages/elderly/index'
				});
			},
			
			// 跳转到志愿者端登录
			goToVolunteerLogin() {
				// 直接跳转到志愿者端页面
				uni.navigateTo({
					url: '/pages/volunteer/index'
				});
			},
			
			// 显示帮助详情
			showHelpDetail() {
				uni.showModal({
					title: '选择说明',
					content: '老年用户为接受志愿者服务的用户群体，可以使用发布订单等功能；志愿者用户为服务老年人的用户群体，可以进行接做订单等功能。60岁以上用户默认为老年用户；30岁以下用户默认为志愿者用户。（点击弹窗外任意位置关闭）',
					showCancel: false,
					confirmText: '知道了'
				});
			}
		}
	}
</script>

<style>
	.login-container {
		min-height: 100vh;
		background: #ffffff;
	}
	
	/* 主要内容区域 */
	.main-content {
		padding: 60rpx 40rpx;
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		box-sizing: border-box;
	}
	
	/* 头部区域 */
	.header-section {
		text-align: center;
		margin-bottom: 60rpx;
		margin-top: 40rpx;
		padding-top: 40rpx;
		padding-bottom: 40rpx;
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}
	
	.welcome-title {
		display: block;
		font-size: 40rpx;
		font-weight: bold;
		color: #333333;
		line-height: 1.4;
	}
	
	/* 入口选择区域 */
	.entry-section {
		display: flex;
		flex-direction: column;
		margin-top: 110rpx;
	}
	
	/* 帮助说明区域 */
	.help-section {
		display: flex;
		align-items: center;
		padding: 20rpx;
		margin-top: 80rpx;
	}
	
	.help-icon {
		width: 32rpx;
		height: 32rpx;
		margin-right: 16rpx;
		flex-shrink: 0;
	}
	
	.help-content {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	
	.help-text {
		font-size: 26rpx;
		color: #666666;
		line-height: 1.4;
		flex: 1;
	}
	
	.help-detail {
		font-size: 26rpx;
		color: #007aff;
		margin-left: 20rpx;
		flex-shrink: 0;
	}
	
	.section-title {
		text-align: center;
		font-size: 32rpx;
		color: #333333;
		margin-bottom: 50rpx;
		font-weight: 500;
	}
	
	.entry-cards {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 80rpx;
	}
	
	.entry-card {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 20rpx;
	}
	
	.entry-image {
		width: 120rpx;
		height: 120rpx;
		margin-bottom: 20rpx;
	}
	
	.entry-title {
		font-size: 28rpx;
		color: #333333;
		font-weight: 500;
	}
	
	/* 底部区域 */
	.footer-section {
		text-align: center;
		margin-top: 60rpx;
	}
	
	.footer-text {
		font-size: 24rpx;
		color: #999999;
	}
	
	/* 底部图片区域 */
	.bottom-section {
		text-align: center;
		margin-top: 120rpx;
	}
	
	.bottom-image {
		width: 200rpx;
		height: 200rpx;
	}
</style>
